package com.example.message.bundle;

import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.naming.OperationNotSupportedException;

import com.example.message.core.Message;
import com.example.message.core.MessageSearchParameter;
import com.example.message.core.MessageService;
import com.example.message.core.UnsupportedMethodException;

public class ResourceBundleMessageService implements MessageService{

	private String baseName;
	private ResourceBundle defaultBundle;
	
	public ResourceBundleMessageService(String baseName) {
	}

	@Override
	public void saveMessage(Message message) {
		throw new UnsupportedMethodException();
	}

	@Override
	public Message getMessage(String code, String language) {
		ResourceBundle bundle = ResourceBundle.getBundle(baseName, new Locale(language));
		String message = bundle.getString(code);
		return null;
	}

	@Override
	public Message getMessage(String code, String language, double version) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Message> getMessages(String code) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Message> getMessages(String code, double version) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Message> filterMessages(MessageSearchParameter parameter) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setDefaultLanguage(String language) {
		// TODO Auto-generated method stub
		
	}
	
	
}
